var t = getApp(), a = void 0;

Page({
    data: {
        currentPage: 1,
        pageSize: 10,
        list: [],
        total: 0
    },
    onLoad: function(t) {
        a = this, this.setData({
            type: t.type
        });
    },
    onShow: function() {
        a.getList(0);
    },
    getList: function(e) {
        0 == e ? this.data.currentPage = 1 : this.data.currentPage += 1, wx.showLoading({
            title: "加载中"
        }), t.com.post("wx/evaluate/list", {
            user_type: this.data.type,
            pageSize: this.data.pageSize,
            currentPage: this.data.currentPage
        }, function(t) {
            wx.stopPullDownRefresh(), wx.hideLoading(), 0 === t.errno && a.setData({
                list: t.data.data,
                total: t.data.count
            });
        });
    },
    onReachBottom: function() {
        this.data.list.length < this.data.total && this.getList(1);
    }
});